package com.pattern.adaptor;

/**
 * @author cheyinbo
 * @description Projector将USB映射为VGA，只有VGA接口才可以连接上投影仪进行投影
 * @date 2021/8/24 14:42
 */
public class Projector<T> {

    public void projection(T t){
        if(t instanceof VGA){
            System.out.println("开始投影");
            VGA vga = (VGA)t;
            vga.projection();
        }else{
            System.out.println("接口内不匹配");
        }
    }

}
